home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Magazine / C_Tutorial / Part-13 / PatchLib / source / RemovePatch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-01  |  1.2 KB  |  57 lines

  1. /*
  2. **    patch.library
  3. **
  4. **    Copyright © 1993-1997 by Stefan Fuchs
  5. **        Freely distributable.
  6. */
  7.  
  8. #ifndef _PATCH_INCLUDES_H
  9. #include "patch_includes.h"
  10. #endif
  11.  
  12.  
  13. /****** patch.library/RemovePatch ***************************************
  14. *
  15. *   NAME
  16. *        RemovePatch -- Removes a patch installed by InstallPatch().
  17. *
  18. *   SYNOPSIS
  19. *        Error = RemovePatch( patch )
  20. *        D0                   A0
  21. *
  22. *        ULONG Error RemovePatch( struct Patch * );
  23. *
  24. *   FUNCTION
  25. *        This function is obsolete from V2 on, use RemovePatchTags() instead.
  26. *        It effectively calls the new function
  27. *        RemovePatchTags(patch, PATT_DelayedExpunge, FALSE, TAG_DONE)
  28. *
  29. *   INPUTS
  30. *        patch = pointer to the patch structure or NULL for no action
  31. *
  32. *   RESULT
  33. *        Error = errorcode as defined in patch.h.
  34. *                (for more information see RemovePatchTags() )
  35. *
  36. *   NOTES
  37. *
  38. *   BUGS
  39. *
  40. *   SEE ALSO
  41. *        RemovePatchTags(), patch.h
  42. *
  43. ******************************************************************************
  44. *
  45. */
  46.  
  47. ULONG LIBFUNC RemovePatch( REGA0 struct Patch *patch GNUC_REGA0)
  48. {
  49. struct TagItem taglist[2];
  50.     taglist[0].ti_Tag = PATT_DelayedExpunge;
  51.     taglist[0].ti_Data = 0L;
  52.  
  53.     taglist[1].ti_Tag = TAG_DONE;
  54.  
  55.     return(RemovePatchTagsA(patch, taglist));
  56. }
  57.